#ifndef MAINWINDOW_H
#define MAINWINDOW_H

#include <QMainWindow>
#include "configdialog.h"
#include "control.h"

namespace Ui {
class MainWindow;
}

class MainWindow : public QMainWindow
{
    Q_OBJECT

public:
    explicit MainWindow(QWidget *parent = 0);
    ~MainWindow();

    //int main_control(void);

    void print_wt(double level1, double level2);

    //void *main_control_print(void);

protected:
    //static void *main_control_print_helper(void *pMain);

    /*static void *main_pump_control_helper(void *pControl);

    static void *main_wt1_clear_helper(void *pControl);

    static void *main_wt2_clear_helper(void *pControl);*/

private slots:

    void main_print(QString  pumpStatus, QString semPump, QString semWt1,
                    QString semWt2, QString level1, QString leve2);

    void on_startButton_clicked();

    void on_pauseButton_clicked();

    void on_stopButton_clicked();

    void on_configButton_clicked();

private:
    Ui::MainWindow *ui;

    //Ponteiro para a classe Control
    Control *ctrl;

    //pthread_t pump_control;//thread da tarefa de controle do uso da bomba
    //pthread_t wt1_clean;//thread da tarefa esvaziar caixa 1
    //pthread_t wt2_clean;//thread da tarefa esvaziar caixa 2

};


#endif // MAINWINDOW_H
